<format>
  <id company="Oracle" name="11g alert log xml" />
  <description>XML-formatted alert log written by Oracle Database 11g or later</description>
  <xml>
    <patterns>
      <pattern>log.xml</pattern>
      <pattern>*.xml</pattern>
    </patterns>
    <encoding>utf-8</encoding>	
    <head-re><![CDATA[\<msg]]></head-re>
	
	<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:lj="http://logjoint.codeplex.com/">

		<xsl:output method="xml"/>

		<xsl:template match='msg'>
			<m>
				<xsl:attribute name='d'>
					<xsl:value-of select="@time"/>
				</xsl:attribute>
				<xsl:attribute name='s'>
					<xsl:choose>
						<xsl:when test="@type='ERROR'">e</xsl:when>
						<xsl:when test="@type='WARNING'">w</xsl:when>
						<xsl:otherwise>i</xsl:otherwise>
					</xsl:choose>
				</xsl:attribute>

				<xsl:value-of select="txt"/><xsl:value-of select="lj:NEW_LINE()"/>
				<xsl:text>Organization ID: </xsl:text><xsl:value-of select="@org_id"/><xsl:value-of select="lj:NEW_LINE()"/>
				<xsl:text>Component ID: </xsl:text><xsl:value-of select="@comp_id"/><xsl:value-of select="lj:NEW_LINE()"/>
				<xsl:text>Client ID: </xsl:text><xsl:value-of select="@client_id"/><xsl:value-of select="lj:NEW_LINE()"/>
				<xsl:text>Process ID: </xsl:text><xsl:value-of select="@pid"/><xsl:value-of select="lj:NEW_LINE()"/>
				<xsl:text>Type: </xsl:text><xsl:value-of select="@type"/><xsl:value-of select="lj:NEW_LINE()"/>
				<xsl:text>Host ID: </xsl:text><xsl:value-of select="@host_id"/><xsl:value-of select="lj:NEW_LINE()"/>
				<xsl:text>Host addr: </xsl:text><xsl:value-of select="@host_addr"/><xsl:value-of select="lj:NEW_LINE()"/>
				<xsl:text>Module: </xsl:text><xsl:value-of select="@module"/><xsl:value-of select="lj:NEW_LINE()"/>				
			</m>
		</xsl:template>
	</xsl:stylesheet>

  </xml>
</format>